﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VerTarifasPorPeriodo.aspx.cs" Inherits="NewTierra.Pages.VerTarifasPorPeriodo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

    <link href="~/Styles/EstiloGeral.css" rel="stylesheet" type="text/css" />

    <style type="text/css">
        h1, h2, h3, h4, h5, h6
        {
            font-size: 1.5em;
            color: #666666;
            font-variant: small-caps;
            text-transform: none;
            font-weight: 200;
            margin-bottom: 0px;
        }

        #VerTarifas
        {
            width: 784px;
            height: 1025px;
            padding: 5px;
        }

            #VerTarifas .VerTarifasGridTarifas
            {
                width: 441px;
                float: left;
                padding: 10px;
            }

            #VerTarifas .VerTarifasGridMeal
            {
                width: 241px;
                float: left;
                margin-left: 20px;
                padding: 10px;
                height: 673px;
            }

            #VerTarifas .GridPeriodos
            {
                height: 171px;
                width: 446px;
                padding: 10px;
                float: left;
            }

            #VerTarifas .GridBases
            {
                height: 169px;
                float: left;
                overflow-x: hidden;
                overflow-y: auto;
                padding: 10px;
                width: 294px;
            }

            #VerTarifas .Cabecalho
            {
                width: 730px;
                float: left;
                height: 94px;
            }

        .scrollGridPeriodos
        {
            width: 411px;
            height: 140px;
            overflow: auto;
        }
    </style>

    <title></title>
</head>
<body>

    <form id="form1" runat="server">

        <div id="VerTarifas">

            <h1>
                <asp:Label ID="lblSupplierTarifaTXT" runat="server" Text="Supplier:" />

                <span style="font-size: 20pt; color: #CC0000;">
                    <asp:Label ID="lblSupplierTarifa" runat="server" Text="" />
                </span>

            </h1>
            <hr />

            <div class="Cabecalho">

                <asp:Label ID="lblMercadoTXT" runat="server" Text="Mercado:"></asp:Label>
                &nbsp;<asp:Label ID="lblMercado" runat="server" Font-Size="Small" Text=""></asp:Label><br />

                <asp:Label ID="lblBaseTarifariaTXT" runat="server" Text="Base Tarifária:"></asp:Label>
                &nbsp;<asp:Label ID="lblBaseTarifaria" runat="server" Font-Size="Small" Text=""></asp:Label><br />

                <asp:Label ID="lblResponsavelTXT" runat="server" Text="Responsável:"></asp:Label>
                &nbsp;<asp:Label ID="lblResponsavel" runat="server" Font-Size="Small" Text="" /><br />

                <asp:Button ID="btnFecharTarifas" class="btnGeralAzul" runat="server" Text="Fechar" OnClientClick="window.close();" />
            </div>

            <div class="GridPeriodos">

                <fieldset style="height: 159px; width: 425px;">
                    <legend>Períodos</legend>

                    <div class="scrollGridPeriodos">
                        <asp:GridView ID="GridTarifasPeriodo"
                            runat="server"
                            AutoGenerateColumns="False"
                            GridLines="None"
                            CssClass="mGrid"
                            EmptyDataText="Não existe Periodos para esse Supplier."
                            Height="16px"
                            Width="16px"
                            PageSize="5" OnSelectedIndexChanged="GridTarifasPeriodo_SelectedIndexChanged">

                            <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                            <SelectedRowStyle CssClass="SelectedRowStyle" />
                            <Columns>

                                <asp:BoundField DataField="S_merc_periodo_id" HeaderText="ID" ReadOnly="True"
                                    SortExpression="S_merc_periodo_id" InsertVisible="False">

                                    <FooterStyle CssClass="invisible" />
                                    <HeaderStyle CssClass="invisible" />
                                    <ItemStyle CssClass="invisible" />
                                </asp:BoundField>

                                <asp:BoundField DataField="S_merc_periodo_from" HeaderText="From"
                                    SortExpression="S_merc_periodo_from" DataFormatString="{0:dd/MM/yy}">

                                    <ItemStyle Wrap="False" />
                                </asp:BoundField>

                                <asp:BoundField DataField="S_merc_periodo_to" HeaderText="To"
                                    SortExpression="S_merc_periodo_to" DataFormatString="{0:dd/MM/yy}">

                                    <ItemStyle Wrap="False" />
                                </asp:BoundField>

                                <asp:BoundField DataField="S_mercado_estacao_nome" HeaderText="Estação"
                                    SortExpression="S_mercado_estacao_nome" />

                                <asp:BoundField DataField="S_merc_periodo_fdsFrom" HeaderText="Fds From"
                                    SortExpression="S_merc_periodo_fdsFrom"
                                    DataFormatString="{0:dd/MM/yy}">
                                    <HeaderStyle Wrap="False" />
                                    <ItemStyle Wrap="False" />
                                </asp:BoundField>

                                <asp:BoundField DataField="S_merc_periodo_fdsTo" HeaderText="Fds To"
                                    SortExpression="S_merc_periodo_fdsTo" DataFormatString="{0:dd/MM/yy}">
                                    <HeaderStyle Wrap="False" />
                                    <ItemStyle Wrap="False" />
                                </asp:BoundField>

                                <asp:BoundField DataField="Pacote_nome" HeaderText="Pacote" SortExpression="Pacote_nome">
                                    <HeaderStyle Wrap="True" />
                                    <ItemStyle Wrap="True" />
                                </asp:BoundField>

                                <asp:CommandField ShowSelectButton="True" ButtonType="Image" SelectImageUrl="~/images/Icones/edit.png" />

                            </Columns>

                            <PagerStyle CssClass="pgr"></PagerStyle>

                        </asp:GridView>
                    </div>

                </fieldset>

            </div>

            <div class="GridBases">

                <fieldset style="height: 148px; width: 177px;">
                    <legend>Bases</legend>

                    <asp:Label ID="lblSemBaseTXT" runat="server" Text="" />

                    <asp:GridView ID="GridBases" runat="server" AutoGenerateColumns="False" CssClass="mGrid" EmptyDataText="Não existe base para este supplier." GridLines="None" Height="77px" Width="16px" OnSelectedIndexChanged="GridBases_SelectedIndexChanged">
                        <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                        <SelectedRowStyle CssClass="SelectedRowStyle" />
                        <Columns>
                            <asp:BoundField DataField="Base_id" HeaderText="ID" SortExpression="Base_id">
                                <HeaderStyle CssClass="invisible" />
                                <FooterStyle CssClass="invisible" />
                                <ItemStyle CssClass="invisible" />
                            </asp:BoundField>

                            <asp:BoundField DataField="Base_de" HeaderText="De" SortExpression="Base_de" />
                            <asp:BoundField DataField="Base_ate" HeaderText="Para" SortExpression="Base_ate" />

                            <asp:CommandField ShowSelectButton="True" ButtonType="Image" SelectImageUrl="~/images/Icones/edit.png" />

                        </Columns>

                        <PagerStyle CssClass="pgr"></PagerStyle>
                    </asp:GridView>

                </fieldset>
            </div>

            <div class="VerTarifasGridTarifas">

                <asp:Label ID="lblMoedaTXT" runat="server" Text="Moeda:"></asp:Label>
                &nbsp;<asp:Label ID="lblMoeda" runat="server" CssClass="MsgErro" Text=""></asp:Label><br />
                <br />

                <fieldset>
                    <legend>Tarifas</legend>

                    <asp:RadioButtonList ID="RdoTarifa" runat="server" AutoPostBack="True"
                        RepeatDirection="Horizontal" Width="250px" Height="16px"
                        OnSelectedIndexChanged="RdoTarifa_SelectedIndexChanged">
                        <asp:ListItem Value="0">Por Pessoa</asp:ListItem>
                        <asp:ListItem Value="1" Selected="True">Por Apartamento</asp:ListItem>
                    </asp:RadioButtonList>

                    <asp:GridView ID="GridTarifas" runat="server" AllowPaging="True"
                        AutoGenerateColumns="False" GridLines="None" CssClass="mGrid" EmptyDataText="Não existe Tarifa cadastrada para esse periodo."
                        Height="16px" PageSize="30" OnPageIndexChanging="PaginarDadosTarifas"
                        Width="53px">
                        <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>

                        <Columns>

                            <asp:BoundField DataField="S_mercado_tipo_tarifa_nome" HeaderText="Tarifa Nome" SortExpression="S_mercado_tipo_tarifa_nome">
                                <HeaderStyle Wrap="False" />
                                <ItemStyle Wrap="False" />
                            </asp:BoundField>

                            <asp:BoundField DataField="Tarif_categoria_nome" HeaderText="Categoria"
                                SortExpression="Tarif_categoria_nome">

                                <ItemStyle Wrap="False" />
                            </asp:BoundField>

                            <asp:BoundField DataField="Tipo_room_nome" HeaderText="Room"
                                SortExpression="Tipo_room_nome">

                                <ItemStyle Wrap="False" />
                            </asp:BoundField>

                            <asp:BoundField DataField="S_merc_tarif_tarifa_total" HeaderText="Tarifa" SortExpression="S_merc_tarif_tarifa_total" DataFormatString="{0:N}">

                                <HeaderStyle Wrap="False" />
                                <ItemStyle Wrap="False" />
                            </asp:BoundField>

                            <asp:BoundField DataField="S_mercado_tarifa_status_nome" HeaderText="Status" SortExpression="S_mercado_tarifa_status_nome" />

                        </Columns>

                        <PagerStyle CssClass="pgr"></PagerStyle>

                    </asp:GridView>

                </fieldset>

            </div>

            <div class="VerTarifasGridMeal">

                <fieldset>
                    <legend>Meal</legend>

                    <asp:GridView ID="GridMeal" runat="server" AllowPaging="True"
                        AutoGenerateColumns="False" GridLines="None" CssClass="mGrid" EmptyDataText="Não existe Meal cadastrado para esse periodo."
                        Height="16px" PageSize="30" OnPageIndexChanging="PaginarDadosMeal" Width="16px">
                        <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>

                        <Columns>

                            <asp:BoundField DataField="S_meal_nome" HeaderText="Meal"
                                SortExpression="S_meal_nome">

                                <HeaderStyle Wrap="False" />
                                <ItemStyle Wrap="False" />
                            </asp:BoundField>                            

                            <asp:BoundField DataField="S_merc_meal_tarifa_total" HeaderText="Tarifa" SortExpression="S_merc_meal_tarifa_total" />
                            <%--<asp:BoundField DataField="S_merc_meal_tarifa" HeaderText="Tarifa" SortExpression="S_merc_meal_tarifa" />--%>

                            <asp:BoundField DataField="S_mercado_tarifa_status_nome" HeaderText="Status"
                                SortExpression="S_mercado_tarifa_status_nome">

                                <ItemStyle Wrap="False" />
                            </asp:BoundField>

                        </Columns>

                        <PagerStyle CssClass="pgr"></PagerStyle>

                    </asp:GridView>


                </fieldset>

            </div>

        </div>

    </form>

</body>
</html>
